package com.atguigu.rulepo;

import org.jeasy.rules.api.Condition;
import org.jeasy.rules.api.Facts;

// 通过接口的方式标记为条件
public class TenPercentDiscountCondition implements Condition {

    @Override
    public boolean evaluate(Facts facts) {
        Integer price = (Integer) facts.get("price");
        return price >= 200 && price < 400;
    }
    
}

